#include "sprite.h"

Sprite::Sprite ( std::string & _filename , P_LOAD_FUNCTION(_loadFP), UINT _w, UINT _h) {     
   filename = _filename;
   surface = NULL;
   loadFP = _loadFP;
   geometry = new Rect ( 0, 0, _w, _h);
   animated = false;
}

void AnimatedSprite::generateRects  ( UINT _width, UINT _height   )  {
   pDebug( this << " void AnimatedSprite::generateRects (" << "UINT _width=" << &_width << "UINT _height =" << &_height    << ")")
    pDebug ( "Generating Rects ");
   Rect* geo = getGeometry();
   for ( UINT i = 0; i < frames; i++ ) {
      geo->set( _width*i, 0, _width, _height );
      geo++;
   }
}
